When an industrial robot is to be put into operation for a certain task, for example spot welding, it must be programmed to carry out the task. During spot welding the robot is to move in the fastest possible way between a large number of fixed points and, at each point, carry out a welding operation. To have a starting point for the programming of the robot, the positions of the welding points are calculated in advance. However, this calculation only provides a rough estimate of the accurate positions of the points. A robot program for spot welding comprises a series of robot instructions which instruct the robot as to what points to move to, how it should move between the points, and what to do at the points. Before it is possible to start using the robot program, it has to be test-run. A number of things have to be corrected in the robot program before it is finished, for example the positions of the points and the speed at which the robot is to move between the points. During the test run the robot program is stepped such that one instruction at a time can be test run. After carrying out a change in a robot instruction, the robot program must be capable of being reversed such that the changed instruction can be test run again. Repeated changes in the instruction may be needed before it is approved.
To make it simple to try out a finished robot program, it is a requirement for the robot program to be able to be run step-by-step both in the forward and the backward direction. When a robot instruction is run backwards, it is not always to carry out the same operation as when it is run forwards. In, for example, spot welding, a welding instruction which is run forwards may comprise the following steps:
1) open welding gun, PA1 2) move robot to next given spot, PA1 3) close welding gun, PA1 4) weld. PA1 1) open welding gun, PA1 2) move robot back to preceding point. PA1 - a forward list, i.e. an instruction sequence, comprising a first set of robot instructions; and PA1 - a backward list comprising a second set of robot instructions.
If the same welding instruction is run backwards, it is to comprise the following steps:
The above example shows that when reversing an instruction, it does not function merely to carry out the steps of the instruction in the reverse order, but a completely different set of instructions are needed for running backwards.
When programming an industrial robot, usually some form of robot language is used. The robot language is formed such that it is simple to use for the robot user, who may be a person without knowledge or experience of programming. An instruction in the robot language, a robot instruction, consists of a call to a routine which comprises a set of instructions written in some programming language. The traditional way of developing a robot language means that the robot manufacturer himself develops the robot language while using a general high-level language. A robot instruction then consists of a call to a set of instructions written in the high-level language. Developing a robot instruction in high-level language, a so-called fixed robot instruction, requires on the one hand a programmer with sufficient knowledge of the high-level languages, and on the other hand that the development is carried out in a system development environment on an external computer. A fixed robot instruction is supplied by the robot manufacturer, and it cannot be changed by a robot user who has neither knowledge of the high-level language nor access to the external computer.
A robot is used in a wide variety of applications, for example spray-painting, welding, and assembly. Each application has its specific need of robot instructions. It is impossible for the robot manufacturer to develop robot instructions for all of these different needs. It is, therefore, desirable both for the robot manufacturer and the robot user to be able to develop new robot instructions in a simple way without having to use traditional system development.